<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>
    <style>
        .box1,
        .box2,
        .box3 {

            /* float: left; */
            width: 300px;
            max-height: 500px;
            min-height: 20px;
            border: 1px solid #000;
            margin: 2px;
            text-indent: 2em;

        }


        .btn2,
        .btn3 {
            margin-top: 50px;
        }
    </style>
</head>

<body>
    <button class="btn1">摇身一变是舔狗</button>
    <div class="box1"></div>
    <button class="btn2">彩虹屁</button>
    <div class="box2"></div>
    <button class="btn3">网易云热评</button>
    <div class="box3"></div>

    <script src="./jquery.3.3.1.js"></script>
    <script>

        $('.btn1').on('click', () => {
            $.ajax({
                url: 'http://api.tianapi.com/txapi/tiangou/index',
                type: 'get',
                data: { key: '52e794f7333705f5ff7456806a0d8605' },
                success: (res) => {
                    $('.box1').html(res.newslist[0].content)
                }
            })
        })
        $('.btn2').on('click', () => {
            $.ajax({
                url: 'http://api.tianapi.com/txapi/caihongpi/index',
                type: 'get',
                data: { key: '52e794f7333705f5ff7456806a0d8605' },
                success: (res) => {
                    $('.box2').html(res.newslist[0].content)
                }
            })
        })
        $('.btn3').on('click', () => {
            $.ajax({
                url: 'http://api.tianapi.com/txapi/caihongpi/index',
                type: 'get',
                data: { key: '52e794f7333705f5ff7456806a0d8605' },
                success: (res) => {
                    $('.box3').html(res.newslist[0].content)
                }
            })
        })


    </script>

</body>

</html>